/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.ufpb.halloc.dados;

/**
 *
 * @author Filipe
 */
public class CentroDAOArquivoFactory extends CentroDAOFactory {
    
    public static final int TXT = 1;
    public static final int BIN = 2;
    public static final int XML = 3;
    
    private static CentroDAOArquivoFactory arquivoDAOFactory;
    
    /*SINGLETON*/
    public static CentroDAOArquivoFactory getInstance(){
        if (arquivoDAOFactory == null)
            arquivoDAOFactory = new CentroDAOArquivoFactory();
        return arquivoDAOFactory;
    }  
    
    private CentroDAOArquivoFactory(){
        
    }
    
    @Override
    public CentroDAO getCentroDAO(int tipoPersistenciaArquivo) {
        
        switch (tipoPersistenciaArquivo){
            case TXT:
                return CentroDAOArquivoTxt.getInstance();
            case BIN:
                return CentroDAOArquivoBin.getInstance();
            case XML:
                return CentroDAOArquivoXml.getInstance();
            default:
                return null;
        }
        
    }

    
    
    
}
